Repository navigation
feat: group rows into outline levels in the xlsx and ods writers - #203
Merged
Merged
Conversation
Check a row's outline level with one unsigned compare and test the ods row path with one; leave BeginSheet's clearing of the held row to CloseSheet, which already leaves none. Name the outline in the BeginSheet and BeginRow docs. Pin what the suite left open: an outlined sheet after one that ended in a hidden group starts without its state (xlsx), a sheet without ShownLevels after one with it opens expanded (ods), the header heads a hidden first group (xlsx), and LibreOffice reads an xlsx outline with summary rows below as it reads one with summary rows above.
Move the row grouping section after the merged ranges it had split from their heading, and include its example from a compiled sample instead of an inline block. Word the error code table's write.outline-level row for a level the sheet does not declare, and amend the design to the row holding as built, in neutral wording.
# Conflicts: # src/TriasDev.Tabular/PublicAPI.Unshipped.txt
vaceslav
added a commit
that referenced
this pull request
Nov 27, 2026
🤖 I have created a release *beep* *boop* --- ## [0.9.0](v0.8.3...v0.9.0) (2026-11-27) ### Features * an option to read csv quotes strictly, refusing what the reader would otherwise repair ([#199](#199)) ([3ba2885](3ba2885)) * group rows into outline levels in the xlsx and ods writers ([#203](#203)) ([5b87928](5b87928)), closes [#197](#197) ### Bug Fixes * strict csv quoting names where it refuses, stays cancellable and drops any whitespace around a quoted field ([#202](#202)) ([3d4f26b](3d4f26b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Slava <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A sheet can now group its rows the way Excel's and LibreOffice's outline does, so a report whose rows form a hierarchy — a parent row followed by its children — opens collapsible instead of flattened, with the parent's values repeated on every child.
What changes
SheetOptions.Outlinetakes aRowOutline:Levels(1–7) is the deepest level the sheet uses.SummaryRowsisAboveby default (a parent above its children) orBelow.ShownLevelsopens the file collapsed to that many levels, counted the way Excel's level buttons count them. Null opens everything.TabularWriter.BeginRow(int outlineLevel)begins a row at a level.BeginRow()begins one at level 0, and so does every header, batch and export row.TabularWriteExceptionwrite.outline-level, located at the row that would have been written. The row limit is judged first.BeginSheetwithArgumentOutOfRangeException.TabularExportBuilder<T>.Buildrefuses an outline, because an export has no way to give a level yet.<outlinePr summaryBelow="0"/>,<sheetFormatPr outlineLevelRow>, andoutlineLevel/hidden/collapsedon rows.table:table-row-group, withtable:display="false"on collapsed groups andtable:visibility="collapse"on hidden rows.What a reader of the code would not guess
docs/KNOWN-ISSUES.mdlists the shapes in which LibreOffice then shows "−" over hidden rows, and the cases where a collapsed group ends the sheet.EndRow; now it happens at the nextBeginRow, or when the sheet closes.ShownLevels, whether a row iscollapseddepends on the next row, so that row's start tag has to wait.FlushRecommendedmay turn true one row later than before.OutlineUnchangedBytesTestspins this for csv, xlsx, ods and zip.Verified
Tests:
By hand, in Excel for Mac and LibreOffice:
ShownLevelsthe file opens fully expanded.Write speed, on a Hetzner ccx33 (
refs.sh,SUITE=write, fastest of 5 alternating passes, branch againstmain): every scenario is within ±1 %, below the server's ±3 % noise floor, with the same allocation and peak memory. That includes wide sheets of 5,003 columns, where the deferred encoding holds the largest row.Design:
docs/superpowers/specs/2026-11-27-row-outline-design.md; plan:docs/superpowers/plans/2026-11-27-row-outline.md.Closes #197